/**
 * Copyright 2025 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.overview-container {
  display: flex;
  justify-content: center;
  padding-top: 2%;
  padding-right: 1.5%;

  .overview-sub-container {
      width: 66%;
      background: linear-gradient(92.1deg, #9ebcedb2 19.16%, rgba(163, 136, 245, 0.651) 79%, rgba(234, 68, 53, 0.493) 135.24%);
      border-radius: 12px;
      .overview-text {
          font-family: 'Roboto';
          font-style: normal;
          font-weight: 500;
          font-size: 20px;
          line-height: 24px;
          color: #5C5F61;
          padding: 2%;
      }
      .overview-content {

          font-family: 'Roboto';
          font-style: normal;
          font-weight: 400;
          font-size: 19px;
          line-height: 30px;
          color: #161A1D;
          padding-left: 2%;
          padding-right: 2%;
          padding-bottom: 2%;

      }

      .overview-button {
          button {
              font-family: 'Roboto';
              font-style: normal;
              font-weight: 400;
              font-size: 20px;
              line-height: 24px;
              color: #4285F4;
              padding: 40px;
          }
      }
  }

}

.header-container {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 19px;
  color: #5F6368;
  display: flex;
  justify-content: flex-start;
  width: 66%;
}

.search-result:hover {
  border: 1px solid #DFE0E2;
  border-radius: 10px;
}

.search-result-parent-container{
  display: flex;
  flex-direction: column;
  width: 66%;
  gap: 15px;
  padding-bottom: 5%;
}

.search-result-row-container {
  display: flex;
  flex-direction: row;
  gap: 15px;
}

.search-result {
  padding: 1%;
  padding-top: 2%;
  cursor: pointer;
  border: 1px solid transparent;
  width: 25%;

  .title-container {
      display: flex;
      flex-direction: row;
      font-family: 'Roboto';
      font-style: normal;
      font-weight: 500;
      font-size: 16px;
      line-height: 31px;
      color: #161A1D;
      display: flex;
      gap: 15px;

      .link-container {
        font-size: 14px !important;
        font-weight: 400 !important;
        color: #676c6f !important;
      }
  }

  .description-container {
      font-family: 'Roboto';
      font-style: normal;
      font-weight: 400;
      font-size: 16px;
      line-height: 24px;
      color: #161A1D;
      opacity: 0.8;
      padding: 1%;
      padding-top: 4%;
  }

  .overview-button {
      padding-top: 2%;
      button {
          font-family: 'Roboto';
          font-style: normal;
          font-weight: 400;
          font-size: 16px;
          line-height: 24px;
          color: #4285F4;
      }
  }

}

.padding-top {
  padding-top: 0;
}

.close-container {
 display: flex;
 justify-content: end;
}

.pdf-display{
    display: flex;
    justify-content: center;
}

.overview {
  z-index: 1000;
}

/* card-list.component.scss */
.card-list {
  display: flex;
  gap: 20px; /* Adjust spacing between cards */
}

.card {
  border: 1px solid #eee;
  border-radius: 8px;
  flex: 0 0 auto; /* Prevent cards from stretching */
  box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
  padding: 16px;
  transition: transform 0.2s;

  &:hover {
    transform: scale(1.02);
    box-shadow: 3px 3px 7px rgba(0,0,0,0.15);
    cursor: pointer;
  }

  .card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .card-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;

    .material-symbols-outlined {
        font-size: 1.2rem;
        margin-right: 5px;
        &.bookmark {
            margin-left: auto; // Push bookmark to right
            cursor: pointer;
        }
    }

    .card-title {
      font-weight: 500;
      width: 250px;
    }
  }

  .card-description {
      flex-grow: 1; // Allow description to take up available space
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 10; /* Number of lines to show */
      -webkit-box-orient: vertical;
      width: 250px;
  }

  .card-footer {
    display: flex;
    align-items: center;
    margin-top: 10px;

    .material-symbols-outlined {
      font-size: 1.2rem;
      margin-right: 5px;
    }
  }
}

.documents-container {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1000px;
}

.navigation {
    display: flex;
    justify-content: center;
    margin-top: 20px;

    .nav-button {
        border: none;
        background: none;
        cursor: pointer;
        transition: background-color 0.2s;

        &:hover {
            background-color: #f0f0f0;
        }

        &:disabled {
            opacity: 0.5;
            cursor: default;
        }

        .material-symbols-outlined {
            font-size: 1.5rem;
        }
    }
}

.document-viewer {
  background: rgb(255, 255, 255);
  border-left: 1px solid var(--md-sys-color-outline);
  border-top: 1px solid var(--md-sys-color-outline);
  display: block;
  height: 75%;
  position: fixed;
  right: 0px;
  bottom: 0px;
  width: 35%;
  z-index: 9999;

  .document-viewer-header {
    -webkit-box-pack: justify;
    -webkit-box-align: center;
    -webkit-box-flex: 1;
    align-items: center;
    border-bottom: 1px solid var(--md-sys-color-outline);
    display: flex;
    flex: 1 1 0%;
    justify-content: space-between;
    padding: 8px;
  }

  .document-viewer-content {
    width: 100%;
    height: 100%;
  }
}
